package cn.xiehangs;

import com.badlogic.gdx.Game;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Button;

public class zhu_jie_mian extends Game {
    Batch batch;
    private Screen screen=null;
    private Button button;
    Button.ButtonStyle style1;
    Texture imageUp,imageDown,imageOver;
    Stage stage1;
    String name="start";//用于判断当前是哪个界面
    cn.xiehangs.start start;
    game_2_联网_还没写 game_2;
    cn.xiehangs.game_main game_main;
    cn.xiehangs.choose choose;
    Setting_还没写 Setting;
    int stageWidth = 1024+1024/3;
    int stageHeight = 1024;
    @Override
    public void create() {
        start=new start(this);
//        game_main=new game_main(this);
        game_2=new game_2_联网_还没写();
        Setting=new Setting_还没写();
        choose=new choose(this);
        setScreen(start);
    }
   public void panduan() {
       if (this.name .equals( "start")) {
           if (start.next.equals("choose")) {
               setScreen(choose);
               name=choose.name;
           }
           if (start.next.equals("game_2")) {
               setScreen(game_2);
               name=game_2.name;
           }
           if (start.next.equals("Setting")) {
               setScreen(Setting);
               name=Setting.name;
           }
           if (start.next.equals("Exit")) {
               Gdx.app.exit();
           }
       }
       if (this.name.equals("game_2")) {
           if (game_2.next.equals("start")) {
               setScreen(start);
               name=start.name;
           }
           if (game_2.next.equals("Exit")) {
               Gdx.app.exit();
           }
       }
       if (this.name.equals("Setting")) {
           if (Setting.next.equals("start")) {
               setScreen(start);
               name=start.name;
           }
       }
       if (this.name.equals("choose")) {
           if (choose.next.equals("game_main")) {
               setScreen(game_main);
               game_main.setRobot(choose.is_robot_1,choose.is_robot_2,choose.is_robot_3,choose.is_robot_4);
               name=game_main.name;
           }
       }
       if (this.name.equals("game_main")) {
           if (game_main.next.equals("start")) {
               setScreen(start);
               name=start.name;
           }
       }
   }
}
